using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Createaccount : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Redirect("Login.aspx");
    }
    protected void btnRegister_Click(object sender, EventArgs e)
    {
        BookStoreDataContext bd = new BookStoreDataContext();
        bd.sp_createmember(txtUserID.Text, txtFN.Text, txtLN.Text, txtEmail.Text, txtPhone.Text, txtAddress.Text, int.Parse(txtCardType.Text), txtCardCode.Text);
        bd.SubmitChanges();
        Response.Write("Register successfully!");
    }
    protected void btnReset_Click(object sender, EventArgs e)
    {
        txtUserID.Text = ""; 
        txtPass.Text = "";
        txtConfirm.Text = "";
        txtAddress.Text = "";
        txtPhone.Text = "";
        txtFN.Text = "";
        txtLN.Text = "";
        txtEmail.Text = "";
        txtCardType.Text = "";
        txtCardCode.Text = "";       
    }
}
